package com.starinside.wp.repository.cookbook;

import com.starinside.wp.domain.cookbook.SimpleCookbook;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface SimpleCoookbookRepository extends JpaRepository<SimpleCookbook, String>, JpaSpecificationExecutor<SimpleCookbook> {

    SimpleCookbook getOneByIdAndAreaIdAndDeletedIsFalse(String id, String areaId);


    Page<SimpleCookbook> findAllByAreaIdAndDeletedIsFalse(String areaId, Pageable pageable);


}